package com.hjm.project.transferGear.transferGear.service.impl;

import java.util.List;
import com.hjm.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hjm.project.transferGear.transferGear.mapper.TransferGearMapper;
import com.hjm.project.transferGear.transferGear.domain.TransferGear;
import com.hjm.project.transferGear.transferGear.service.ITransferGearService;
import com.hjm.common.utils.text.Convert;

/**
 * 划拨指标记录Service业务层处理
 * 
 * @author maker-platform
 * @date 2021-01-26
 */
@Service
public class TransferGearServiceImpl implements ITransferGearService 
{
    @Autowired
    private TransferGearMapper transferGearMapper;

    /**
     * 查询划拨指标记录
     * 
     * @param id 划拨指标记录ID
     * @return 划拨指标记录
     */
    @Override
    public TransferGear selectTransferGearById(Long id)
    {
        return transferGearMapper.selectTransferGearById(id);
    }

    /**
     * 查询划拨指标记录列表
     * 
     * @param transferGear 划拨指标记录
     * @return 划拨指标记录
     */
    @Override
    public List<TransferGear> selectTransferGearList(TransferGear transferGear)
    {
        return transferGearMapper.selectTransferGearList(transferGear);
    }

    /**
     * 新增划拨指标记录
     * 
     * @param transferGear 划拨指标记录
     * @return 结果
     */
    @Override
    public int insertTransferGear(TransferGear transferGear)
    {
        transferGear.setCreateTime(DateUtils.getNowDate());
        return transferGearMapper.insertTransferGear(transferGear);
    }

    /**
     * 修改划拨指标记录
     * 
     * @param transferGear 划拨指标记录
     * @return 结果
     */
    @Override
    public int updateTransferGear(TransferGear transferGear)
    {
        transferGear.setUpdateTime(DateUtils.getNowDate());
        return transferGearMapper.updateTransferGear(transferGear);
    }

    /**
     * 删除划拨指标记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTransferGearByIds(String ids)
    {
        return transferGearMapper.deleteTransferGearByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除划拨指标记录信息
     * 
     * @param id 划拨指标记录ID
     * @return 结果
     */
    @Override
    public int deleteTransferGearById(Long id)
    {
        return transferGearMapper.deleteTransferGearById(id);
    }
}
